package com.lynx.controller.util;

import com.lynx.controller.model.JobInfo;
import com.lynx.service.model.JobInfoBO;

/**
 * @author chris.liu
 * @version 5/14/14 3:36 PM
 */
public class JobInfoUtil {

	public static JobInfo bo2vo(JobInfoBO bo) {
		if (bo == null) {
			return null;
		}

		JobInfo vo = new JobInfo();
		vo.setId(bo.getId());
		vo.setName(bo.getName());
		vo.setClazz(bo.getClazz());
		vo.setCron(bo.getCron());
		vo.setDesc(bo.getDesc());
		vo.setStatus(bo.getStatus());
		vo.setLstLog(bo.getLstLog());
		return vo;

	}

	public static JobInfoBO vo2bo(JobInfo vo) {
		if (vo == null) {
			return null;
		}
		JobInfoBO bo = new JobInfoBO();
		bo.setId(vo.getId());
		bo.setName(vo.getName());
		bo.setClazz(vo.getClazz());
		bo.setCron(vo.getCron());
		bo.setDesc(vo.getDesc());
		bo.setStatus(vo.getStatus());
		bo.setLstLog(vo.getLstLog());
		return bo;
	}
}
